﻿<%@ Page Language="C#" MasterPageFile="~/Demo.master" Inherits="DemoPage" Title="Link External Content" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help  ui-corner-all">
        In this sample i will show you how to using MSAjax's Authentication Service in User
        Login Form.It's not using PostBack then webservice.Click the Login Button blow to
        start the Demo.</div>
    <br />
    <DotNetAge:SimpleButton ID="OpenButton" runat="server" Text="Open Dialog" IconCssClass="ui-icon ui-icon-extlink" />
    <%--    <asp:HyperLink ID="OpenButton" runat="server" Style="cursor: pointer">Open Dialog</asp:HyperLink>
--%>
    <DotNetAge:Dialog ID="DemoDialog" runat="server" Draggable="true" Resizable="true"
        Position="Top" Title="Google" ShowModal="false" OnClientOpen="go('http://www.g.cn');"
        OnClientResizeStop="setFrameSize();">
        <Trigger TargetID="OpenButton" />
        <%--        <Buttons><DotNetAge:DialogButton Text="Close" OnClientClick="$(this).dialog('close');" /></Buttons>--%>
        <BodyTemplate>
            <iframe id="subWin" frameborder="0" scrolling="no"></iframe>
        </BodyTemplate>
    </DotNetAge:Dialog>

    <script type="text/javascript">
        function go(url) {
            $("#subWin").attr("src", url);
            setFrameSize();
        }

        function setFrameSize() {
            $("#subWin").parent().css({ "padding": "0px" });
            var bounds = Sys.UI.DomElement.getBounds($get("subWin").parentElement);
            $("#subWin").css({ height: bounds.height, width: bounds.width });
        }
    </script>

    <br />
    <br />
    <br />
    <demo:Code runat="server" ID="codeView" SourceFile="~/Dialog/Codes/ExternalContentSample.aspx" />
</asp:Content>
